home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1987 July & August
/
rerun-1987-07-08.d64
/
flash cards
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
4KB
|
210 lines
10 x=rnd(-ti):s=54272:np=0:dima$(9,5)
20 w$="flash cards"
30 poke53281,0:print"[147][158]"
40 fori=0to24:pokes+i,0:next
50 fori=1to11:print""spc(14)left$(w$,i):poke53280,i:gosub1330:next
60 fori=0to9:forj=1to5
70 reada$(i,j)
80 next:next
90 print"[147][129] flash cards "
100 print""spc(5)"[1] addition
110 [153][166]5)"[2] subtraction
120 printspc(5)"[3] multiplication
130 [153][166]5)"[4] division
140 printspc(5)"[5] mixed
150 [161]k$:[139]k$[178]""[167]150
160 t1[178][197](k$):[139]t1[179]1[176]t1[177]5[167]90
170 t2[178]t1:[139]t1[178]5[167]t2[178]1
180 :
190 [153]"loadprint flash cards "
200 [153]" lower limit of problems (0-9):";
210 [161]k$:[139]k$[178]""[167]210
220 r1[178][197](k$):[139]r1[179]0[176]r1[177]9[167]200
230 [153]k$
240 [153]" upper limit of problems (0-9):";
250 [161]k$:[139]k$[178]""[167]250
260 r2[178][197](k$):[139]r2[179]0[176]r[177]9[167]240
270 [153]k$
280 [139]r1[177]r2[167]190
290 r2[178]r2[170]1
300 [139]t1[178]4[176]t1[178]5[175]r1[178]0[175]r2[178]1[167]1460
310 :
320 [153]"loadcont flash cards "
330 [153]""[166]5)"playing time (1-9 min): "
340 [161]k$:[139]k$[178]""[167]340
350 tm[178][197](k$):[139]tm[179]1[176]tm[177]9[167]320
360 tm[178]tm[172]100
370 [153]"loadclr flash cards "
380 [153]""[166]3)"press firewait to move to next problem
390 printspc(3)"move joytick up[146] for answer
400 [129]t[178]1[164]2000:[130]
410 :
420 ti$[178]"000000"
430 [145]t1[141]1070,1120,1180,1230,1290
440 [145]t2[141]620,740,870,990
450 fb[178][194](56320)[175]16:fr[178]15[171]([194](56320)[175]15)
460 [139]fr[178]1[167][141]1390
470 [139][197](ti$)[177]tm[167]540
480 [139]fb[179][177]0[167]450
490 np[178]np[170]1:[141]1330
500 [139]fl[167]np[178]np[171]1
510 fl[178]0
520 [139][197](ti$)[179]tm[167]430
530 :
540 [153]"loadclr flash cards "
550 [153]""[166]11)"time:"tm[173]100"cmd:00 min"
560 [153][166]5)"# problems: "np
570 [153][166]5)"play again [y/n]
580 getk$:ifk$=""then580
590 ifk$="y"thenrun
600 sys2048:end
610 :
620 print"[147][154] flash cards: addition "
630 fori=1to5:printspc(18)a$(x,i):next
640 print:print
650 printspc(18)a$(y,1)
660 printspc(18)a$(y,2)
670 printspc(13)" [146]";spc(4);a$(y,3)
680 printspc(12)" [146]";spc(3);a$(y,4)
690 printspc(13)" [146]";spc(4);a$(y,5)
700 print
710 printspc(12)" "
720 return
730 :
740 print"[147][153] flash cards: subtraction "
750 ifl=1thenfori=1to5:printspc(18)a$(z,i):next
760 ifl=2thenfori=1to5:printspc(11)a$(z1,i)spc(2)"[146]"a$(z2,i):next
770 print:print
780 printspc(18)a$(y,1)
790 printspc(18)a$(y,2)
800 printspc(18)a$(y,3)
810 printspc(11)" [146]";spc(4);a$(y,4)
820 printspc(18)a$(y,5)
830 print
840 printspc(10)" "
850 return
860 :
870 print"[147][159] flash cards: multiplication "
880 fori=1to5:printspc(18)a$(x,i):next
890 print:print
900 printspc(18)a$(y,1)
910 printspc(18)a$(y,2)
920 printspc(12)" [146]";spc(3);a$(y,3)
930 printspc(12)" [146]";spc(3);a$(y,4)
940 printspc(12)" [146]";spc(3);a$(y,5)
950 print
960 printspc(12)" "
970 return
980 :
990 print"[147][158] flash cards: division "
1000 printspc(16)" "
1010 printspc(16)" "
1020 ifl=1thenfori=1to5:printspc(9)a$(x,i);" [146]";a$(z,i):next
1030 ifl=2thenfori=1to5:printspc(9)a$(x,i);" [146]"a$(z1,i)"[146] "a$(z2,i):next
1040 printspc(16)" "
1050 return
1060 :
1070 x=int(rnd(1)*10)
1080 y=int(rnd(1)*(r2-r1))+r1
1090 z=x+y
1100 return
1110 :
1120 x=int(rnd(1)*10)
1130 y=int(rnd(1)*(r2-r1))+r1
1140 z=x+y:z$=str$(z):l=len(mid$(z$,2))
1150 ifl=2thenz1=val(left$(z$,2)):z2=val(right$(z$,1))
1160 return
1170 :
1180 x=int(rnd(1)*10)
1190 y=int(rnd(1)*(r2-r1))+r1
1200 z=x*y
1210 return
1220 :
1230 x=int(rnd(1)*(r2-r1))+r1:ifx=0then1230
1240 y=int(rnd(1)*10)
1250 z=x*y:z$=str$(z):l=len(mid$(z$,2))
1260 ifl=2thenz1=val(left$(z$,2)):z2=val(right$(z$,1))
1270 return
1280 :
1290 t2=int(rnd(1)*4)+1
1300 ont2gosub1070,1120,1180,1230
1310 return
1320 :
1330 pokes+24,15:pokes+6,240:pokes+4,17
1340 pokes+1,25:pokes,177
1350 fort=1to20:next
1360 pokes+4,16
1370 return
1380 :
1390 print""spc(12)"answer:";
1400 ift2=1thenprintz
1410 ift2=2thenprintx
1420 ift2=3thenprintz
1430 ift2=4thenprinty
1440 fl=1:return
1450 :
1460 print"division by zero not allowed."
1470 print"please start over by pressing any key."
1480 getk$:ifk$=""then1480
1490 run
1500 :
1510 data " "
1520 data " "
1530 data " "
1540 data " "
1550 data " "
1560 :
1570 data " "
1580 data " "
1590 data " "
1600 data " "
1610 data " "
1620 :
1630 data " "
1640 data " "
1650 data " "
1660 data " "
1670 data " "
1680 :
1690 data " "
1700 data " "
1710 data " "
1720 data " "
1730 data " "
1740 :
1750 data " "
1760 data " "
1770 data " "
1780 data " "
1790 data " "
1800 :
1810 data " "
1820 data " "
1830 data " "
1840 data " "
1850 data " "
1860 :
1870 data " "
1880 data " "
1890 data " "
1900 data " "
1910 data " "
1920 :
1930 data " "
1940 data "[169] "
1950 data "[169] [146][169]"
1960 data "[169] [146][169] "
1970 data " "
1980 :
1990 data " "
2000 data " "
2010 data " "
2020 data " "
2030 data " "
2040 :
2050 data " "
2060 data " "
2070 data " "
2080 data " "
2090 data " "